//
//  GGZFBNavigationViewController.m
//  Gunterapple
//
//  Created by 热带雨林 on 2020/4/1.
//  Copyright © 2020 热带雨林. All rights reserved.
//

#import "GGZFBNavigationViewController.h"

@interface GGZFBNavigationViewController ()

@end

@implementation GGZFBNavigationViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    //此处设置导航栏的透明度 没有效果
//    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
//    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
    
}
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    //将当前控制器名称转成字符串
//    NSString *ctrlName = NSStringFromClass([viewController class]);
//    if([ctrlName isEqualToString:@"GGZFBHomeViewController"] || [ctrlName isEqualToString:@"GGZFBBusinessViewController"] || [ctrlName isEqualToString:@"GGZFBFriendsViewController"] || [ctrlName isEqualToString:@"GGZFBMineViewController"])
//        viewController.hidesBottomBarWhenPushed = NO;
//    else
//        viewController.hidesBottomBarWhenPushed = YES;
    //相同的写法
    if(self.childViewControllers.count > 0)
        viewController.hidesBottomBarWhenPushed = YES;
    [super pushViewController:viewController animated:animated];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
